package com.me.mygdxgame;

public class Collidable {

	Box box;
	int a;
	int b;
	int c;
	
	public Box getBox(){
		return box;
	}
	
	public Collidable(int x,int y,int h,int w){
		box = new Box(x,y,h,w);
	}
	
	public void setX(int x){
		box.setX(x);
	}
	
	public void setY(int y){
		box.setY(y);
	}
	
	public void setH(int h){
		box.setH(h);
	}
	
	public void setW(int w){
		box.setW(w);
	}
	
	public int getX(){
		return box.getX();
	}
	
	public int getY(){
		return box.getY();
	}
	
	public int getH(){
		return box.getH();
	}
	
	public int getW(){
		return box.getW();
	}
	
	public void updatePosition(int x,int y){
		box.setX(x);
		box.setY(y);
	}
	
	public boolean isCollidingWith(Collidable obj){
		
		return box.intersects(obj.box);
	}
	
}
